Add a test for the previous PR
authorAlex Crichton <alex@alexcrichton.com>
Wed, 2 Nov 2016 16:36:23 +0000 (09:36 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Wed, 2 Nov 2016 16:36:23 +0000 (09:36 -0700)
tests/doc.rs

index 25ef939c8b5bd530c2748379b680bd8288c785b6..ba5ea85ac30145f95943b9cffad8423148344fc1 100644 (file)
@@ -590,3 +590,25 @@ fn document_only_lib() {
                 execs().with_status(0));
     assert_that(&p.root().join("target/doc/foo/index.html"), existing_file());
 }
+
+#[test]
+fn plugins_no_use_target() {
+    if !cargotest::is_nightly() {
+        return
+    }
+    let p = project("foo")
+        .file("Cargo.toml", r#"
+            [package]
+            name = "foo"
+            version = "0.0.1"
+            authors = []
+
+            [lib]
+            proc-macro = true
+        "#)
+        .file("src/lib.rs", "");
+    assert_that(p.cargo_process("doc")
+                 .arg("--target=x86_64-unknown-openbsd")
+                 .arg("-v"),
+                execs().with_status(0));
+}